In [1]:
import pandas as pd
import numpy as np
from Plate_Analysis_BSA import PlateDataset
import matplotlib.pyplot as plt
import re

plate1_t1 = PlateDataset('20191121_BSA_Dopt_plate_1_t1.CSV')
plate2_t1 = PlateDataset('20191121_BSA_Dopt_plate_2_t1.CSV')
plate1_t2 = PlateDataset('20191121_BSA_Dopt_plate_1_t2.CSV')
plate2_t2 = PlateDataset('20191121_BSA_Dopt_plate_2_t2.CSV')

def PlotTracesAndGetMetrics(plate,wrongwayround,i,plan, metrics):
    if (i-1)%2==0:
        idx = int(i/2)
    else:
        idx = int((i-1)/2)
    row = plan.loc[idx,:]
        
    print(f'{plate.plate_data}\t  Trace {i}')
    print(f"Protein conc = {round(row['Protein Conc'],2)},\
          Vol = {round(row['Protein Vol'],2)}, BSA = {round(row['BSA'],2)} mg/ml")
    NormalizedTraces, DifferenceSpec, DiffDiff = plate.AnalysisPipeline_1(i,wrongwayround)
    plate.PlotTrace(NormalizedTraces,vol=row['Protein Vol'])
    plate.PlotTrace(DifferenceSpec,vol=row['Protein Vol'])
    plate.PlotMichaelesMenten(DiffDiff,row['Protein Vol'],'')
    
    concs = plate.CalculateCompoundConcs(4,row['Protein Vol'],5)
    km, vmax, loss = plate.FitMichaelisMenten(concs,DiffDiff)
    Noise = DifferenceSpec.loc[:,405].std()
    temp = pd.Series([km.item(), vmax.item(), loss.item(),Noise],index = ['Km','Vmax','Loss','Noise'])
    temp = temp.append(row)
    t = plate.metadata.iloc[0,2]
    t = re.search(r'\d\d:\d\d:\d\d',t)[0]
    temp['Time'] = t
    temp = pd.DataFrame(temp).T
    return temp

# Keeping track of which ones I messed up
WrongWayRound_P1 = {1:False,2:False,3:False,4:False,
                5:False,6:False,7:False,8:False,
                9:False,10:False,11:False,12:False,
                13:False, 14:False, 15:False, 16:False,
                17:False,18:False, 19:False,20:False}

WrongWayRound_P2 = {1:True,2:True,3:False,4:False,
                5:False,6:False,7:False,8:False,
                9:False,10:False,11:False,12:False,
                13:False, 14:False, 15:False, 16:False,
                17:False,18:False, 19:False,20:False}
          
          
plan = pd.read_csv('BSA_Dopt.csv',index_col = 0)

metrics = pd.DataFrame([],columns=['Km', 'Vmax', 'Loss', 'Noise','Protein Conc', 'Protein Vol', 'BSA'])
          
for i in range(1,21):
    metrics = metrics.append(PlotTracesAndGetMetrics(plate1_t1,WrongWayRound_P1[i],i,plan,metrics),sort=True)
    metrics = metrics.append(PlotTracesAndGetMetrics(plate2_t1,WrongWayRound_P2[i],i,plan,metrics),sort=True)
    metrics = metrics.append(PlotTracesAndGetMetrics(plate1_t2,WrongWayRound_P1[i],i,plan,metrics),sort=True)
    metrics = metrics.append(PlotTracesAndGetMetrics(plate2_t2,WrongWayRound_P2[i],i,plan,metrics),sort=True)
    
20191121_BSA_Dopt_plate_1_t1.CSV	  Trace 1
Protein conc = 10.0,          Vol = 23.64, BSA = 0.1 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_2_t1.CSV	  Trace 1
Protein conc = 10.0,          Vol = 23.64, BSA = 0.1 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_1_t2.CSV	  Trace 1
Protein conc = 10.0,          Vol = 23.64, BSA = 0.1 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_2_t2.CSV	  Trace 1
Protein conc = 10.0,          Vol = 23.64, BSA = 0.1 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_1_t1.CSV	  Trace 2
Protein conc = 10.0,          Vol = 23.64, BSA = 0.1 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_2_t1.CSV	  Trace 2
Protein conc = 10.0,          Vol = 23.64, BSA = 0.1 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_1_t2.CSV	  Trace 2
Protein conc = 10.0,          Vol = 23.64, BSA = 0.1 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_2_t2.CSV	  Trace 2
Protein conc = 10.0,          Vol = 23.64, BSA = 0.1 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_1_t1.CSV	  Trace 3
Protein conc = 16.36,          Vol = 30.0, BSA = 0.1 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_2_t1.CSV	  Trace 3
Protein conc = 16.36,          Vol = 30.0, BSA = 0.1 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_1_t2.CSV	  Trace 3
Protein conc = 16.36,          Vol = 30.0, BSA = 0.1 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_2_t2.CSV	  Trace 3
Protein conc = 16.36,          Vol = 30.0, BSA = 0.1 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_1_t1.CSV	  Trace 4
Protein conc = 16.36,          Vol = 30.0, BSA = 0.1 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_2_t1.CSV	  Trace 4
Protein conc = 16.36,          Vol = 30.0, BSA = 0.1 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_1_t2.CSV	  Trace 4
Protein conc = 16.36,          Vol = 30.0, BSA = 0.1 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_2_t2.CSV	  Trace 4
Protein conc = 16.36,          Vol = 30.0, BSA = 0.1 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_1_t1.CSV	  Trace 5
Protein conc = 10.0,          Vol = 30.0, BSA = 0.39 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_2_t1.CSV	  Trace 5
Protein conc = 10.0,          Vol = 30.0, BSA = 0.39 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_1_t2.CSV	  Trace 5
Protein conc = 10.0,          Vol = 30.0, BSA = 0.39 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_2_t2.CSV	  Trace 5
Protein conc = 10.0,          Vol = 30.0, BSA = 0.39 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_1_t1.CSV	  Trace 6
Protein conc = 10.0,          Vol = 30.0, BSA = 0.39 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_2_t1.CSV	  Trace 6
Protein conc = 10.0,          Vol = 30.0, BSA = 0.39 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_1_t2.CSV	  Trace 6
Protein conc = 10.0,          Vol = 30.0, BSA = 0.39 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_2_t2.CSV	  Trace 6
Protein conc = 10.0,          Vol = 30.0, BSA = 0.39 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_1_t1.CSV	  Trace 7
Protein conc = 10.0,          Vol = 20.0, BSA = 0.5 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_2_t1.CSV	  Trace 7
Protein conc = 10.0,          Vol = 20.0, BSA = 0.5 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_1_t2.CSV	  Trace 7
Protein conc = 10.0,          Vol = 20.0, BSA = 0.5 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_2_t2.CSV	  Trace 7
Protein conc = 10.0,          Vol = 20.0, BSA = 0.5 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_1_t1.CSV	  Trace 8
Protein conc = 10.0,          Vol = 20.0, BSA = 0.5 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_2_t1.CSV	  Trace 8
Protein conc = 10.0,          Vol = 20.0, BSA = 0.5 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_1_t2.CSV	  Trace 8
Protein conc = 10.0,          Vol = 20.0, BSA = 0.5 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_2_t2.CSV	  Trace 8
Protein conc = 10.0,          Vol = 20.0, BSA = 0.5 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_1_t1.CSV	  Trace 9
Protein conc = 20.0,          Vol = 20.0, BSA = 0.1 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_2_t1.CSV	  Trace 9
Protein conc = 20.0,          Vol = 20.0, BSA = 0.1 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_1_t2.CSV	  Trace 9
Protein conc = 20.0,          Vol = 20.0, BSA = 0.1 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_2_t2.CSV	  Trace 9
Protein conc = 20.0,          Vol = 20.0, BSA = 0.1 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_1_t1.CSV	  Trace 10
Protein conc = 20.0,          Vol = 20.0, BSA = 0.1 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_2_t1.CSV	  Trace 10
Protein conc = 20.0,          Vol = 20.0, BSA = 0.1 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_1_t2.CSV	  Trace 10
Protein conc = 20.0,          Vol = 20.0, BSA = 0.1 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_2_t2.CSV	  Trace 10
Protein conc = 20.0,          Vol = 20.0, BSA = 0.1 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_1_t1.CSV	  Trace 11
Protein conc = 20.0,          Vol = 30.0, BSA = 0.5 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_2_t1.CSV	  Trace 11
Protein conc = 20.0,          Vol = 30.0, BSA = 0.5 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_1_t2.CSV	  Trace 11
Protein conc = 20.0,          Vol = 30.0, BSA = 0.5 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_2_t2.CSV	  Trace 11
Protein conc = 20.0,          Vol = 30.0, BSA = 0.5 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_1_t1.CSV	  Trace 12
Protein conc = 20.0,          Vol = 30.0, BSA = 0.5 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_2_t1.CSV	  Trace 12
Protein conc = 20.0,          Vol = 30.0, BSA = 0.5 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_1_t2.CSV	  Trace 12
Protein conc = 20.0,          Vol = 30.0, BSA = 0.5 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_2_t2.CSV	  Trace 12
Protein conc = 20.0,          Vol = 30.0, BSA = 0.5 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_1_t1.CSV	  Trace 13
Protein conc = 14.55,          Vol = 25.45, BSA = 0.5 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_2_t1.CSV	  Trace 13
Protein conc = 14.55,          Vol = 25.45, BSA = 0.5 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_1_t2.CSV	  Trace 13
Protein conc = 14.55,          Vol = 25.45, BSA = 0.5 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_2_t2.CSV	  Trace 13
Protein conc = 14.55,          Vol = 25.45, BSA = 0.5 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_1_t1.CSV	  Trace 14
Protein conc = 14.55,          Vol = 25.45, BSA = 0.5 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_2_t1.CSV	  Trace 14
Protein conc = 14.55,          Vol = 25.45, BSA = 0.5 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_1_t2.CSV	  Trace 14
Protein conc = 14.55,          Vol = 25.45, BSA = 0.5 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_2_t2.CSV	  Trace 14
Protein conc = 14.55,          Vol = 25.45, BSA = 0.5 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_1_t1.CSV	  Trace 15
Protein conc = 20.0,          Vol = 20.0, BSA = 0.5 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_2_t1.CSV	  Trace 15
Protein conc = 20.0,          Vol = 20.0, BSA = 0.5 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_1_t2.CSV	  Trace 15
Protein conc = 20.0,          Vol = 20.0, BSA = 0.5 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_2_t2.CSV	  Trace 15
Protein conc = 20.0,          Vol = 20.0, BSA = 0.5 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_1_t1.CSV	  Trace 16
Protein conc = 20.0,          Vol = 20.0, BSA = 0.5 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_2_t1.CSV	  Trace 16
Protein conc = 20.0,          Vol = 20.0, BSA = 0.5 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_1_t2.CSV	  Trace 16
Protein conc = 20.0,          Vol = 20.0, BSA = 0.5 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_2_t2.CSV	  Trace 16
Protein conc = 20.0,          Vol = 20.0, BSA = 0.5 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_1_t1.CSV	  Trace 17
Protein conc = 13.64,          Vol = 20.0, BSA = 0.25 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_2_t1.CSV	  Trace 17
Protein conc = 13.64,          Vol = 20.0, BSA = 0.25 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_1_t2.CSV	  Trace 17
Protein conc = 13.64,          Vol = 20.0, BSA = 0.25 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_2_t2.CSV	  Trace 17
Protein conc = 13.64,          Vol = 20.0, BSA = 0.25 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_1_t1.CSV	  Trace 18
Protein conc = 13.64,          Vol = 20.0, BSA = 0.25 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_2_t1.CSV	  Trace 18
Protein conc = 13.64,          Vol = 20.0, BSA = 0.25 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_1_t2.CSV	  Trace 18
Protein conc = 13.64,          Vol = 20.0, BSA = 0.25 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_2_t2.CSV	  Trace 18
Protein conc = 13.64,          Vol = 20.0, BSA = 0.25 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_1_t1.CSV	  Trace 19
Protein conc = 20.0,          Vol = 26.36, BSA = 0.25 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_2_t1.CSV	  Trace 19
Protein conc = 20.0,          Vol = 26.36, BSA = 0.25 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_1_t2.CSV	  Trace 19
Protein conc = 20.0,          Vol = 26.36, BSA = 0.25 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_2_t2.CSV	  Trace 19
Protein conc = 20.0,          Vol = 26.36, BSA = 0.25 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_1_t1.CSV	  Trace 20
Protein conc = 20.0,          Vol = 26.36, BSA = 0.25 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_2_t1.CSV	  Trace 20
Protein conc = 20.0,          Vol = 26.36, BSA = 0.25 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_1_t2.CSV	  Trace 20
Protein conc = 20.0,          Vol = 26.36, BSA = 0.25 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
20191121_BSA_Dopt_plate_2_t2.CSV	  Trace 20
Protein conc = 20.0,          Vol = 26.36, BSA = 0.25 mg/ml
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
In [9]:
metrics
Out[9]:
BSA Km Loss Noise Protein Conc Protein Vol Time Vmax R^2
0 0.1 30.8745 0.00081259 0.0343249 10 23.6364 18:56:54 0.139563 0.999187
1 0.1 232.06 0.011795 0.154616 10 23.6364 19:03:19 0.0110878 0.988205
2 0.1 29.2995 0.000717402 0.0239305 10 23.6364 20:05:07 0.122247 0.999283
3 0.1 150.106 0.0131484 0.110479 10 23.6364 20:22:52 0.0119218 0.986852
4 0.1 41.8421 0.000578105 0.00999615 10 23.6364 18:56:54 0.127217 0.999422
5 0.1 37.3214 0.000648081 0.00777736 10 23.6364 19:03:19 0.115208 0.999352
6 0.1 39.2692 0.000557899 0.00856901 10 23.6364 20:05:07 0.118726 0.999442
7 0.1 35.9658 0.000642657 0.00763128 10 23.6364 20:22:52 0.110195 0.999357
8 0.1 19.1683 0.000954688 0.00798016 16.3636 30 18:56:54 0.163422 0.999045
9 0.1 4.96988 0.000783622 0.049939 16.3636 30 19:03:19 0.154561 0.999216
10 0.1 19.2278 0.0009166 0.00912132 16.3636 30 20:05:07 0.153821 0.999083
11 0.1 4.74124 0.000809669 0.0819529 16.3636 30 20:22:52 0.156947 0.99919
12 0.1 24.2011 0.00110906 0.00971032 16.3636 30 18:56:54 0.141128 0.998891
13 0.1 2.85163 0.00141889 0.0345163 16.3636 30 19:03:19 0.188609 0.998581
14 0.1 26.6453 0.00109023 0.00582761 16.3636 30 20:05:07 0.143447 0.99891
15 0.1 2.28127 0.00141668 0.0408773 16.3636 30 20:22:52 0.168349 0.998583
16 0.390909 18.9843 0.00065136 0.00986076 10 30 18:56:54 0.114458 0.999349
17 0.390909 1.55374 0.000447094 0.0934706 10 30 19:03:19 0.0872795 0.999553
18 0.390909 20.8108 0.000641704 0.00921142 10 30 20:05:07 0.106763 0.999358
19 0.390909 1.74219 0.00045377 0.0881186 10 30 20:22:52 0.0891327 0.999546
20 0.390909 38.5289 0.0007146 0.00549278 10 30 18:56:54 0.134285 0.999285
21 0.390909 43.2395 0.000612974 0.00240404 10 30 19:03:19 0.123123 0.999387
22 0.390909 38.6205 0.000721574 0.00563591 10 30 20:05:07 0.130129 0.999278
23 0.390909 43.2428 0.000612676 0.00231798 10 30 20:22:52 0.121092 0.999387
24 0.5 72.7236 0.000362873 0.0057914 10 20 18:56:54 0.0749823 0.999637
25 0.5 111.07 0.0168197 0.0362681 10 20 19:03:19 0.0600884 0.98318
26 0.5 68.7213 0.000353813 0.00630106 10 20 20:05:07 0.0711239 0.999646
27 0.5 -9.56217 0.0124229 0.0343541 10 20 20:22:52 0.0240258 0.987577
28 0.5 85.1302 0.000244677 0.00438908 10 20 18:56:54 0.098922 0.999755
29 0.5 85.7171 0.000217676 0.00223993 10 20 19:03:19 0.0952402 0.999782
... ... ... ... ... ... ... ... ... ...
50 0.5 24.3299 0.000576377 0.00857154 14.5455 25.4545 20:05:07 0.111085 0.999424
51 0.5 -111.355 0.0585446 0.0668969 14.5455 25.4545 20:22:52 0.0135055 0.941455
52 0.5 121.338 0.000166357 0.0053329 14.5455 25.4545 18:56:54 0.135136 0.999834
53 0.5 75.1172 0.000520825 0.0015573 14.5455 25.4545 19:03:19 0.136139 0.999479
54 0.5 121.33 0.000157952 0.00565094 14.5455 25.4545 20:05:07 0.12946 0.999842
55 0.5 75.8192 0.000503302 0.00354868 14.5455 25.4545 20:22:52 0.131302 0.999497
56 0.5 15.475 0.00041455 0.00760371 20 20 18:56:54 0.0882054 0.999585
57 0.5 17.3093 0.000207663 0.0497924 20 20 19:03:19 0.0668582 0.999792
58 0.5 15.5041 0.000383317 0.00910187 20 20 20:05:07 0.0823346 0.999617
59 0.5 15.0128 0.000215769 0.0512561 20 20 20:22:52 0.0616886 0.999784
60 0.5 118.714 0.000138223 0.00244178 20 20 18:56:54 0.102316 0.999862
61 0.5 95.9729 0.000224233 0.00109385 20 20 19:03:19 0.0945815 0.999776
62 0.5 115.417 0.000147581 0.0026702 20 20 20:05:07 0.0974681 0.999852
63 0.5 91.7699 0.000229537 0.000702484 20 20 20:22:52 0.089001 0.99977
64 0.245455 0.404614 0.00139666 0.0406971 13.6364 20 18:56:54 0.0377183 0.998603
65 0.245455 14.9002 0.000180602 0.0586098 13.6364 20 19:03:19 0.0511664 0.999819
66 0.245455 100.165 0.0145702 0.0389312 13.6364 20 20:05:07 0.0550925 0.98543
67 0.245455 16.0129 0.000181854 0.0549738 13.6364 20 20:22:52 0.0504616 0.999818
68 0.245455 54.1648 0.000413418 0.00216164 13.6364 20 18:56:54 0.110694 0.999587
69 0.245455 63.2541 0.000316024 0.00517409 13.6364 20 19:03:19 0.10053 0.999684
70 0.245455 52.7028 0.000406325 0.0015967 13.6364 20 20:05:07 0.103118 0.999594
71 0.245455 63.3378 0.000296175 0.00447964 13.6364 20 20:22:52 0.0955798 0.999704
72 0.245455 0.686156 0.00121146 0.074163 20 26.3636 18:56:54 0.08109 0.998789
73 0.245455 18.6757 0.000474989 0.0959057 20 26.3636 19:03:19 0.122646 0.999525
74 0.245455 -109.508 0.059561 0.0720769 20 26.3636 20:05:07 0.0145383 0.940439
75 0.245455 18.3991 0.000478029 0.0895894 20 26.3636 20:22:52 0.118888 0.999522
76 0.245455 54.661 0.000593364 0.00567433 20 26.3636 18:56:54 0.15806 0.999407
77 0.245455 51.8335 0.000670075 0.00418459 20 26.3636 19:03:19 0.152946 0.99933
78 0.245455 55.5967 0.00056386 0.00432127 20 26.3636 20:05:07 0.151863 0.999436
79 0.245455 51.5148 0.000657558 0.00282488 20 26.3636 20:22:52 0.148743 0.999342

80 rows × 9 columns

In [10]:
metrics.reset_index(inplace=True,drop=True)
metrics['R^2'] = 1-metrics['Loss']
metrics.to_csv('BSA_Dopt_metrics.csv')
In [8]:
def PlotHist(df, colname):
    plt.figure(figsize = (5,4))
    plt.hist(df[colname],bins=20,alpha=0.8)
    plt.xlabel(colname)
    plt.ylabel('Frequency')
    plt.show()
    
for i in ['Km','Vmax','R^2']:
    PlotHist(metrics,i)
No description has been provided for this image
No description has been provided for this image
No description has been provided for this image
In [ ]: